package edu.washington.cs.sounddetector.server.api.method;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.ToStringBuilder;

import edu.washington.cs.sounddetector.server.api.Method;

public class Untrain implements Method
{

    private List<Long> soundIds;

    public Untrain()
    {
    }

    public Untrain(List<Long> soundIds)
    {
        Validate.notEmpty(soundIds);
        Validate.noNullElements(soundIds);
        
        this.soundIds = new ArrayList<Long>(soundIds);
    }

    /**
     * @param soundIds
     *            the soundIds to set
     */
    public void setSoundIds(List<Long> soundIds)
    {
        this.soundIds = soundIds;
    }

    /**
     * @return the soundIds as an unmodifiable collection
     */
    public List<Long> getSoundIds()
    {
        return Collections.unmodifiableList(soundIds);
    }

    public String toString()
    {
        return new ToStringBuilder(this).append("soundIds", soundIds).toString();
    }
}
